package edu.hunau.cxb19.oop.class06.finals;

/**
 *
 *@author hb
 *
 * 2020-03-02 16:14:31
 */
public class FinalTest {

	public void call() {
		int a=100;
		a=11;
		final int b=100;
		// b=0;编译失败
		final int c;
		c=200;
		//c=100;
		final int[] arr=new int[2];
        arr[1]=99;//arr的引用没有被修改
        //arr=new int[2]; 编译失败
	}
}

class Xoo{
	private int a;
	private final int b ; 
	public Xoo() {
		b=200;//在构造器中对b进行初始化
	}
	private static final double PI;
	static {
		PI=3.14;
	}
}

